package com.atguigu.mapper;

import com.atguigu.base.BaseMapper;
import com.atguigu.entity.UserFollow;
import com.atguigu.entity.vo.UserFollowVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserFollowMapper extends BaseMapper<UserFollow> {

    //判断当前用户是否已关注该房源信息
    UserFollow isFollow(@Param("userId") Long userId,@Param("houseId") Long houseId);

    //根据用户id和房源id查询用户的关注信息
    UserFollow findUserFollowByUserIdAndHouseId(@Param("userId") Long userId, @Param("houseId") Long houseId);

    /**
     * 查询我的关注的分页信息
     * @param userId
     * @return
     */
    List<UserFollowVo> findUserFollowVoPage(Long userId);
}
